"""
检查图片是否损坏，True：没坏 False： 坏了
"""

import checkcorruptedimages
from pathlib import Path


def is_valid_image(path):
    m = checkcorruptedimages.CheckCorruptedImages()
    m.verbose = True
    li = m.get_corrupted_images(
    folder_to_check=Path(path),
    file_extensions_list=["jpg"]
    )
    return li


if __name__ == '__main__':
    pa = "E:\\work_space\\数据集\\porn-detect\\porn\\"
    # l = is_valid_image(pa)
    # print(l)
